#ifndef RP2SMARTPOINTER_H
#define RP2SMARTPOINTER_H

namespace Rp2
{

template <class T>
class Pointer
{
public:
	// construction and destruction
	Pointer(T* Object = 0);
    Pointer (const Pointer& rkPointer);
    ~Pointer ();

    // implicit conversions
    operator T* () const;
    T& operator* () const;
    T* operator-> () const;

    // assignment
    Pointer& operator= (T* pkObject);
    Pointer& operator= (const Pointer& rkReference);

    // comparisons
    bool operator== (T* pkObject) const;
    bool operator!= (T* pkObject) const;
    bool operator== (const Pointer& rkReference) const;
    bool operator!= (const Pointer& rkReference) const;

protected:
    // the shared object
    T* m_pkObject;
};

#include "Rp2SmartPointer.inl"
}

#endif